package com.codejoys.ssm.dao;

import com.codejoys.ssm.domain.Discipline;
import com.codejoys.ssm.domain.School;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SchoolDao {

    void deleteByIds(Integer[] ids);
    void deleteById(Integer id);

    @Select("select * from school limit #{start},#{size}")
    List<School> findPage(@Param("start") Integer start,@Param("size") Integer size);


    @Select("select * from school order by ${sort}")
    List<School> findAllAndSort(String sort);

    List<School> findByCondition(School school);

    List<Discipline> findBySchoolId(School school);

    List<School> findByDiscipline(Discipline discipline);
}
